<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>个人简历练习</title>
</head>
<body>
<table border="1">
    <caption>个人简历</caption>
    <tr>
        <td>照片:</td>
        <td id="td_img"></td>
    </tr>
    <tr>
        <td>姓名:</td>
        <td id="td_name"></td>
    </tr>
    <tr>
        <td>年龄:</td>
        <td id="td_age"></td>
    </tr>
    <tr>
        <td>好友:</td>
        <td id="td_friends"></td>
    </tr>
</table>
</body>
<script>
    let person = {
        name: '范传奇',
        age: 40,
        friends: ['小明', '小红', '小刚'],
        imgUrl: 'img/fcq.jpg'
    }
    let nameTd = document.querySelector('#td_name');
    let ageTd = document.querySelector('#td_age');
    let imgTd = document.querySelector('#td_img');
    let friendsTd = document.querySelector('#td_friends');
    nameTd.innerHTML = person.name;
    ageTd.innerHTML = person.age;
    let imgE = document.createElement('img');
    imgE.src = person.imgUrl;
    imgE.width = 200;
    imgTd.append(imgE);
    let ulE = document.createElement('ul');
    ulE.type = 'none';
    for (let i = 0; i < person.friends.length; i++) {
        let li = document.createElement('li');
        li.innerHTML = person.friends[i];
        ulE.append(li);
    }
    friendsTd.append(ulE);
    console.log(location.search)
</script>
</html>